<?php

namespace app\admin\validate\user;

use think\Validate;

class Order extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'order_no' => 'require|unique:user_order',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'order_no.unique' => '该订单号已存在'
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add' => [],
        'edit' => ['order_no'],
    ];

}
